package com.onest;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class MyAspect3 {
    @Pointcut("execution(* com.onest.*.*(..))")
    private void test(){}

    @Before("execution(* com.onest.*.*(..))")
    public void myBefor(JoinPoint joinpoint){
        System.out.println("前置通知开始");
        System.out.println(joinpoint.getTarget());
        System.out.println(joinpoint.getSignature().getName());

    }
}
